<template>
    <div class="section-title clearfix">
      <div class="title-left">
        <img v-if="title.icon" :src="title.icon" alt="图片加载中"/>
        <span :class="[title.line ? 'title-name line':'title-name']">{{title.name}}</span>
      </div>
      <div class="title-right" v-if="title.operate">
        <router-link to="/personal/center/profile/editOwnProfile.do" class="edit el-icon-edit-outline"></router-link>
      </div>
    </div>
</template>

<script>
export default {
  name: 'SectionTitle',
  props: {title: Object}
}
</script>

<style scoped>
.section-title{
  line-height: 40px;
  padding-left: 10px;
  font-size: 20px;
  color: #333;
  border-bottom: 1px solid #F6F6F6;
}
  .line{
    padding-left: 15px;
    border-left: 10px solid #dd4545;
  }
  .title-left{
    float: left;
  }
  .title-right{
    float: right;
    padding-right: 20px;
  }
  .edit{
    cursor: pointer;
  }
</style>
